package org.demo.util;

/**
 * 系统变量
 * @author dell
 *
 */
public class SysConstant {
	/**
	 * 关键字
	 */
	public static final String KEYWORD = "keyword";
	
	/**
	 * 操作符
	 */
	public static final String OPERTATOR = "operator";
	
	/**
	 * 界符
	 */
	public static final String END = "end";
	
	/**
	 * 仅用与区分
	 */
	public static final String IDENTITY = "identity";
	public static final String NUM = "num";
	
	/**
	 * 初始状态
	 */
	public static final String INIT_STATE = "state";
	
	//每个类别的机内符
	public static final int KEYWORD_SYMBOL = 1200; //升级: 考虑到数字需要二进制 避免二义性
	public static final int OPERATOR_SYMBOL = 2000;
	public static final int END_SYMBOL = 3000;
	public static final int NUM_SYMBOL = 40000;
	public static final int IDNETIFY_SYMBOL = 50000;
	
	
	public static boolean isValidConstant(String key) {
		return (
				IDENTITY.equals(key)
				|| KEYWORD.equals(key) 
				|| NUM.equals(key) 
				|| OPERTATOR.equals(key)
				|| END.equals(key)
				);
	}
}
